home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / callback.001 / callback~ / callback / lib / log / log.h < prev    next >
C/C++ Source or Header  |  1996-07-23  |  1KB  |  36 lines

  1. #ifndef _log_H_
  2. #define _log_H_
  3.  
  4. #include <stdio.h>
  5. #include <stdarg.h>
  6. #include <time.h>
  7.  
  8. #include "../mem/mem.h"
  9. #include "../startup/startup.h"
  10.  
  11. typedef enum            /* messages at the level indicated by the       */
  12. {                       /* 'log' setting in the setup file and lower    */
  13.     log_off,            /* are logged.                                  */
  14.     log_default,        /* In the sources a log value of the logtype    */
  15.     log_on,             /* indicates a severe situation:                */
  16.     log_max,            /* log_off: very serious, log_max: only minor   */
  17. } LOG_TYPE_;
  18.  
  19. unsigned logdefaults();                         /* 0 if we're not to log the */
  20.                                                 /* default settings          */
  21. char *get_logtypestring();
  22. char *get_logfilename();
  23. char *get_diallogfilename();
  24. char *get_panicfilename();
  25.  
  26. void setlog(LOG_TYPE_ type);
  27. void set_logdefaults();             
  28. void setlogfilename(char *name);
  29. void setdiallogfilename(char *name);
  30. void setpanicfilename(char *name);
  31.  
  32. void log(LOG_TYPE_ minimum, char *fmt, ...);    /* generic log function */
  33. void logv(char *fmt, va_list args);            /* va-list log function */
  34.                     
  35. #endif  _log_H_
  36.